<?php

include ("../jpgraph/src/jpgraph.php");
include ("../jpgraph/src/jpgraph_bar.php");
require_once("../jpgraph/src/jpgraph_date.php"); 
require_once("../jpgraph/src/jpgraph_line.php");

// We need some data
$start = time();
$datax = array();
$datay = array();
for($i=0; $i<300; $i++) 
{
	$datay[]=rand(40,50);
	$datax[]=$start+$i*12;
}
$datay[299] = 60;

// Setup the graph. 
$graph = new Graph(305,210,"auto");	
$graph->SetScale("datlin", 0, 60);
$graph->xaxis->scale->SetDateFormat('i');
$graph->xaxis->scale->SetTimeAlign(MINADJ_10,MINADJ_1);
//$graph->xaxis->HideTicks();
$graph->yaxis->HideLabels();
$graph->yscale->ticks->Set(20);
$graph->xscale->ticks->Set(600);
$graph->img->SetMargin(25,15,25,125);
$graph->SetAlphaBlending(true); 


//$graph->title->Set('"GRAD_MIDVER"');
$graph->title->SetColor('darkred');

// Setup font for axis
$graph->xaxis->SetFont(FF_FONT1);
$graph->yaxis->SetFont(FF_FONT1);

//$graph->xaxis->SetLabelAngle(90);

// Create the bar pot
$bplot = new BarPlot($datay, $datax);
$bplot->SetAbsWidth(0.00001);

// Setup color for gradient fill style 
//$bplot->SetFillGradient("navy","lightsteelblue",GRAD_MIDVER);

// Set color for the frame of each bar
$bplot->SetColor("red@0.6");
$bplot->SetNoFill(); 
$bplot->SetFillColor('red@0.5');
$color = array(0, 0, 0);
$graph->SetFrame(false); 
$graph->Add($bplot);

// Finally send the graph to the browser
$graph->Stroke();
?>
